package com.cqtczh.qhd.driver.model;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.Message;


/** * @author  作者 陈修园: 
 * @date 创建时间：2015-4-25 下午2:54:19 
 * @version 1.0 
 * @parameter  
 * @since  
 * @return  
 */
public class PusMessageTester extends BroadcastReceiver {
	
	public Handler handler;
	
	
	public void UpdataView(final PusCallback Callback) {
		// TODO Auto-generated method stub
		handler=new Handler(){
			@Override
			public void handleMessage(Message msg) {
				// TODO Auto-generated method stub
				super.handleMessage(msg);
				Callback.msgget((String)msg.obj);
			}
		};
	}
	
	
	@Override
	public void onReceive(Context arg0, Intent arg1) {
		// TODO Auto-generated method stub
		Message msg=Message.obtain();
		msg.obj="onReceive获得";
		handler.sendMessage(msg);
	}

	

	public interface PusCallback{
		public void msgget(String msg);
	}
	
}
